const { reactive, effect } = VueReactivity;

function setHtml(html) {
  const app = document.getElementById('app');
  app.innerHTML = html;
}

const state = reactive([1, 2]);

effect(() => {
  setHtml(`${state}`);
});

// setInterval(() => {
//   state[1] += 1;
// }, 1000);

// setInterval(() => {
//   state.push(3)
// }, 1000);

effect(() => {
  state.push(2);
});

// setTimeout(() => {
//   state[3] = 0;
// }, 1000);
